package com.kdtech.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtils {

	/**
	 * convert a date to string date
	 * @param date
	 * @param format
	 * @return
	 */
	public static String getyyyyMMdd(Date date, String format) {
		SimpleDateFormat sdf = new SimpleDateFormat(format);
		return sdf.format(date);
	}
	
	
	public static void main(String[] args) {
		System.out.println(getyyyyMMdd(new Date(), "yyyy_MM_dd"));
	}
}
